﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// PhongBan Repository. Good example of CRUD operations.
    ///// </summary>
    public class PhongBanRepository : IPhongBanRepository
    {
        private static readonly IPhongBanDao _phongBan = DataAccess.PhongBanDao;
        public List<PhongBan> GetList()
        {
            return _phongBan.GetPhongBan().ToList();
        }

        public PhongBan Get(string id)
        {
            return _phongBan.GetPhongBanByID(id);
        }

        public void Insert(PhongBan t)
        {
            _phongBan.InsertPhongBan(t);
        }

        public void Update(PhongBan t)
        {
            _phongBan.UpdatePhongBan(t);
        }

        public void Delete(PhongBan t)
        {
            _phongBan.DeletePhongBan(t);
        }
    }
}